package com.enjoyor.health.HGPT.core.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author enjoyor
 * @since 2023-10-31
 */
@TableName("physical_examination_package")
@ApiModel(value = "PhysicalExaminationPackage对象", description = "")
public class PhysicalExaminationPackage implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    @ApiModelProperty("体检包类型")
    private Integer packageType;

    @ApiModelProperty("体检包名称")
    private String packageTypeName;

    @ApiModelProperty("套餐名称")
    private String name;

    @ApiModelProperty("性别，0-男，1-女")
    private Integer gender;

    @ApiModelProperty("状态，1-有效，0-已下架")
    private String type;

    @ApiModelProperty("设备厂家")
    private String company;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getPackageType() {
        return packageType;
    }

    public void setPackageType(Integer packageType) {
        this.packageType = packageType;
    }

    public String getPackageTypeName() {
        return packageTypeName;
    }

    public void setPackageTypeName(String packageTypeName) {
        this.packageTypeName = packageTypeName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    @Override
    public String toString() {
        return "PhysicalExaminationPackage{" +
                "id = " + id +
                ", packageType = " + packageType +
                ", packageTypeName = " + packageTypeName +
                ", name = " + name +
                ", gender = " + gender +
                ", type = " + type +
                ", company = " + company +
                "}";
    }

    public enum PhyExamEnum{
        PKG_BAYA(1, "银江全身报告", "芭雅"),
        PKG_ROBOT(2, "银江展会体检包", "机器人"),
        PKG_21D(3, "全身疾病筛查", "21D");

        PhyExamEnum(Integer packageType, String packageTypeName, String company) {
            this.packageType = packageType;
            this.packageTypeName = packageTypeName;
            this.company = company;
        }

        public static PhyExamEnum getByPkgType(Integer pkgType){
            for (PhyExamEnum value : PhyExamEnum.values()) {
                if (Objects.equals(value.packageType, pkgType)){
                    return value;
                }
            }
            return null;
        }

        private Integer packageType;
        private String packageTypeName;
        private String company;

        public Integer getPackageType() {
            return packageType;
        }

        public String getPackageTypeName() {
            return packageTypeName;
        }

        public String getCompany() {
            return company;
        }
    }

}
